﻿using Abp.Domain.Repositories;
using Microsoft.AspNetCore.Mvc;
using Ny.Ci.Application.Mention.Dto;
using Ny.Ci.Core.Users;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ny.Ci.Application.Mention
{
    [ApiExplorerSettings(GroupName = "CiApi")]
    public class CiMentionAppService : ICiMentionAppService
    {
        private readonly IRepository<User, Guid> _userRepository;
        private readonly IRepository<Test,Guid> _testRepository;

        public CiMentionAppService(IRepository<User, Guid> userRepository, IRepository<Test,Guid> testRepository)
        {
            _userRepository = userRepository;
            _testRepository = testRepository;
        }

        public string GetMentionString(string name)
        {
            return "你妹的";
        }

        public List<Test> GetTestModelList()
        {
            return _testRepository.GetAll().ToList();
        }

        /// <summary>
        /// 获取人员列表
        /// </summary>
        /// <returns></returns>
        public List<UserDto> GetUserList()
        {
            var s= _userRepository.GetAll().ToList();
            return new List<UserDto>(
                AutoMapper.Mapper.Map<List<UserDto>>(s));
        }
    }
}
